home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 17 / CU Amiga Magazine's Super CD-ROM 17 (1997)(EMAP Images)(GB)[!][issue 1997-12].iso / CUCD / Programming / DiceSource / src / dmake / save / defs.h < prev    next >
Encoding:
C/C++ Source or Header  |  1992-12-19  |  1.9 KB  |  103 lines

  1.  
  2. /*
  3.  *  DEFS.H
  4.  */
  5.  
  6. #ifdef AMIGA
  7. #include <exec/types.h>
  8. #include <exec/nodes.h>
  9. #include <exec/lists.h>
  10. #include <lists.h>
  11. #else
  12. #include <suplib/lists.h>
  13. #include <suplib/memory.h>
  14.  
  15. #define __aligned
  16.  
  17. #endif
  18.  
  19. #include <stdio.h>
  20. #include <stdlib.h>
  21. #include <string.h>
  22. #include <time.h>
  23. #include <sys/stat.h>
  24. #ifdef AMIGA
  25. #include <clib/alib_protos.h>
  26. #include <clib/exec_protos.h>
  27. #include <exec/libraries.h>
  28.  
  29. extern struct Library *SysBase;
  30. #define Running2_04() (SysBase->lib_Version >= 37)
  31. #endif
  32.  
  33. typedef struct Node Node;
  34. typedef struct List List;
  35.  
  36. typedef unsigned char ubyte;
  37. typedef unsigned short uword;
  38. typedef unsigned long ulong;
  39.  
  40. #define Prototype extern
  41.  
  42. #define FATAL    0
  43. #define WARN    1
  44. #define DEBUG    2
  45.  
  46. #define PBUFSIZE 256
  47.  
  48. #define NT_RESOLVED    0x01
  49.  
  50. #if USE_DEBUG
  51. #define dbprintf(x)  { if (DDebug) printf x;}
  52. #define db3printf(x) { if (DDebug >= 3) printf x;}
  53. #define db4printf(x) { if (DDebug >= 4) printf x;}
  54. #else
  55. #define dbprintf(x)
  56. #define db3printf(x)
  57. #define db4printf(x)
  58. #endif
  59. /*
  60.  *  A DepNode collects an entire left hand side symbol
  61.  *  A DepCmdList collects one of possibly several groups for a DepNode
  62.  *  A DepRef specifies a single dependency within a group
  63.  *
  64.  */
  65.  
  66. typedef struct DepNode {
  67.     Node    dn_Node;
  68.     List    dn_DepCmdList;    /*  list of lists   */
  69.     time_t  dn_Time;
  70.     short   dn_Symbolic;
  71.     short   dn_Reserved;
  72. } DepNode;
  73.  
  74. typedef struct DepRef  {
  75.     Node    rn_Node;
  76.     DepNode *rn_Dep;
  77. } DepRef;
  78.  
  79. typedef struct DepCmdList {
  80.     Node    dc_Node;        /*  greater link node    */
  81.     List    dc_RhsList;     /*  right hand side(s)    */
  82.     List    *dc_CmdList;     /*  command buf list     */
  83. } DepCmdList;
  84.  
  85. #define NT_CMDEOL   0x01
  86.  
  87. typedef struct CmdNode {
  88.     Node    cn_Node;
  89.     long    cn_Idx;
  90.     long    cn_Max;
  91.     long    cn_RIndex;
  92. } CmdNode;
  93.  
  94. typedef struct Var {
  95.     Node    var_Node;
  96.     List    var_CmdList;
  97. } Var;
  98.  
  99. #include "tokens.h"
  100. #include "dmake-protos.h"
  101.  
  102.  
  103.